-
Notifications
You must be signed in to change notification settings - Fork 193
Support Unicode Gem path #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Could you provide some reproducible test case? I'm trying to reproduce your problem but even by creating some mix encoding paths, I'm not able to: >> Dir["**/*.rb"]
=> ["t€st/\xC3.rb"]
>> Dir["**/*.rb"].map(&:encoding)
=> [#<Encoding:UTF-8>]I suspect there's more to this problem, like a LOCALE issue perhaps. |
|
I'm not exactly sure what causes to use # encoding: ISO-8859-1
module Kernel
alias_method :actual_require, :require
def require(path)
puts "requiring #{path} with #{path.encoding} encoding"
actual_require(path)
end
end
require 'tzinfo/data'My LANG env var is |
Can you provide the entire backtrace then? |
That is whole backtrace, for some reason it doesn't show anything more. Basically this happens when I try to use Metasploit Framework Also note that most of requires work fine, only some deeply in loading when it tries to load Here's full backtrace without Ruby's fix |
|
I'm gonna wait to see how ruby/rubygems#8196 and ruby/ruby#11958 are resolved. |
I'm using RVM and my
$HOMEis located at/home/Dāviswhich means GEM path is at/home/Dāvis/.rvm/rubies/ruby-3.3.4/lib/ruby/gems/Currently this causes bootsnap to fail with
This is because
Gem.pathis at["/home/Dāvis/.rvm/rubies/ruby-3.3.4/lib/ruby/gems/3.3.0"]and it's UTF-8 encoded while sometimespathcan be withASCII-8BITencoding.Note that there is similar issue within Ruby aswell, see ruby/ruby#11958